/* Reset */
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, figcaption, blockquote, dl, dd, header {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    list-style: none;
}

/* Import typography */
@import url('../common/typography.css');

/* Base styles */
body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100vw;
    box-sizing: border-box;
    cursor: none;
}

main {
    margin: 0 5em;
}

/* Typography sizing */
h1 {
    text-align: left;
    font-weight: 800;
    line-height: 1;
    font-size: clamp(2rem, 6vw, 8vw);
}

h2 {
    text-align: left;
    font-weight: 800;
    line-height: 1;
}

p {
    font-weight: 400;
    font-size: clamp(0.9rem, 1.6vw, 1.80vw);
    line-height: 1.6em;
    display: block;
    max-width: 100%;
    color: #FFF0DF;
}

/* Loading state */
.js-loading h3,
.js-loading .projet {
    opacity: 0;
    visibility: hidden;
}

/* Fade-in animation */
.fade-in {
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, 
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                visibility 0s linear 0s;
    will-change: opacity, transform, visibility;
}

.fade-in.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Layout Components */
header {
    grid-column:1;
    grid-row:2;
    width: fit-content;
    line-height: 6vw;
}

img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.container {
    width: auto;
    height: auto;
    overflow: hidden;
}

footer {
     display: flex;
     align-items: center;
     justify-content: space-between;
     position: fixed;
     bottom: 10px;
     right: 0;
     width: 100%;
     z-index: 1000;
}

/* Navigation */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0 5.5rem 0 4rem;
}

/* Menu Styles */
.menu {
    display: flex;
    font-family: var(--font-primary);
    color: var(--color-light);
    font-weight: 900;
    font-size: clamp(1em, 1.5vw, 1.5vw);
    transform: scale(1.1);
}

.menu li a {
    position: relative;
    margin: 0 0.5em;
    color: var(--color-dark);
    text-decoration: none;
    overflow: hidden;
    cursor: none;
    transition: var(--transition-default);
}

.menu li a span {
    display: inline-block;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.menu li a:hover {
    transform: scale(1.08);
}

/* Grid Layout */
.informations {
    display: grid;
    grid-template-rows: repeat(6, auto);
    grid-template-columns: repeat(3, auto);
    gap: 20px;
    align-items: center;
    min-height: 100vh;
}

.parag1 {
    grid-column: 1/2;
    grid-row: 2/span 3;
}

.parag2 {
    grid-column: 1/2;
    grid-row: 4/span 4;
}

.date {
    grid-column: 1;
    grid-row: 3;
}

/* Color Sections */
.colors {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-row: 3;
    grid-column: 3;
    gap: 3vw;
    width: fit-content;
    opacity: 0;
    transform: translateY(30px);
    justify-content: revert;
}

.colors.active {
    opacity: 1;
    transform: translateY(0);
}

.colorcircle {
    align-content: center;
    width: 5vw;
    height: 5vw;
    border-radius: 50%;
    transition: opacity 1.2s ease-out, transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Project Styles */
.projet {
    width: 100%;
    grid-column: 3;
    grid-row: 4;
    position: relative;
    overflow: visible;
    height: 50vh;
    cursor: none;
    aspect-ratio: 14/9;
}

.projet img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

/* Dots Navigation */
.dots-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    grid-column: 3;
    grid-row: 5;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #FFF0DF;
    opacity: 0.4;
    transition: opacity 0.3s ease;
    cursor: none;
}

.dot.active {
    opacity: 1;
}

.dot:hover {
    opacity: 0.7;
}

/* Utilities */
.copyright {
    font-family: 'Outfit';
    font-weight: 900;
    font-size: clamp(1em, 2vw, 2vw);
}

.text-overlay, .text-overlay2 {
    font-size: 1vw;
    text-align: center;
}

/* Custom cursor */
#custom-cursor {
    position: fixed;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    background: #FFF0DF;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    top: 0;
    left: 0;
    opacity: 1;
    transition: width 0.2s cubic-bezier(0.165, 0.84, 0.44, 1),
                height 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#custom-cursor.cursor-hover {
    width: 42px;
    height: 42px;
}

/* Cursor none for hover */
.menu li a:hover span,
.copyright:hover,
.menu li a:hover {
    cursor: none;
}

/* Responsive Styles */
@media screen and (max-width: 1340px) {
  main {
    margin: 0 1.5em;
  }
  .informations {
    gap: 32px;
  }
  .parag1, .parag2 {
    max-width: 98vw;
    font-size: 1.1em;
  }
  .colors {
    gap: 2vw;
  }
  .projet {
    max-width: 90vw;
    min-width: 320px;
  }
  nav {
    margin-right: 95px;
    padding: 0 1em;
  }
}

@media screen and (max-width: 1080px) {
  main {
    margin: 0 1em;
  }
  .informations {
    gap: 28px;
  }
  .parag1, .parag2 {
    font-size: 1em;
  }
  .projet {
    max-width: 98vw;
  }
  .colors {
    gap: 1vw;
  }
  nav {
    margin-right: 95px;
    padding: 0 0.5em;
  }
}

/* Mobile Responsive */
@media screen and (max-width: 770px) {
    /* Ensure full width for the body and main container */
    body {
        width: 100vw;
        overflow-x: hidden;
        margin: 0;
        padding: 0;
    }

    main {
        width: 100vw;
        margin: 0;
        padding: 0 15px 80px 15px;
        box-sizing: border-box;
    }

    /* Fix footer width */
    footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100vw;
        margin: 0;
        padding: 12px 15px;
        background: rgba(24, 24, 24, 0.98);
        backdrop-filter: blur(8px);
        box-sizing: border-box;
        -webkit-box-sizing: border-box;
        transform: translateX(0);
    }

    nav {
        width: 100%;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    /* Layout adjustments */
    .informations {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 25px;
        padding: 20px 10px;
    }

    header {
        width: 100%;
        text-align: center;
        margin: 20px 0;
    }

    /* Typography adjustments */
    h1 {
        font-size: clamp(5.5rem, 6vw, 2.5rem);
        line-height: 1.2;
        margin-bottom: 15px;
    }

    .parag1, .parag2 {
        width: 100%;
        font-size: clamp(1rem, 4vw, 1.2rem);
        line-height: 1.6;
        padding: 0 10px;
        text-align: left;
    }

    .date {
        font-size: 1rem;
        margin: 10px 0;
    }

    /* Colors section */
    .colors {
        display: flex;
        justify-content: center;
        gap: 20px;
        margin: 15px 0;
        width: 100%;
    }

    .colorcircle {
        width: 60px;
        height: 60px;
        min-width: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .text-overlay, .text-overlay2 {
        font-size: 0.9rem;
        color: #FFF0DF;
        text-align: center;
        position: absolute;
    }

    /* Project section */
    .projet {
        width: 100%;
        aspect-ratio: 16/9;
        margin: 20px 0;
    }

    .projet img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Dots navigation */
    .dots-container {
        display: flex;
        justify-content: center;
        gap: 12px;
        margin: 15px 0;
        width: 100%;
    }

    .dot {
        width: 10px;
        height: 10px;
    }

    /* Footer adjustments */
    footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(24, 24, 24, 0.98);
        backdrop-filter: blur(8px);
        padding: 12px;
    }

    nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 15px;
    }

    .menu {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .menu li {
        margin: 0;
    }

    .menu li a {
        font-size: 0.9rem;
        padding: 5px 8px;
        white-space: nowrap;
    }

    .copyright {
        font-size: 0.85rem;
        white-space: nowrap;
        opacity: 0.9;
    }

    /* Adjust main content to prevent footer overlap */
    main {
        padding-bottom: 80px;
    }
}

/* Extra small screens */
@media screen and (max-width: 480px) {
    nav {
        flex-direction: column;
        gap: 10px;
    }

    .menu {
        order: -1;
        margin-bottom: 5px;
    }

    .copyright {
        font-size: 0.8rem;
    }

    footer {
        padding: 10px;
    }
}